@import './common.scss';
@import './cropper.scss';

.img-tools-container {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;

    &>*{
        box-sizing:inherit;
    }
}

.top-part {
    width: 100%;
    padding: 4px 16px;
    border-bottom: 1px solid rgba(0, 0, 0,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left-btn {
    outline: transparent;
    position: relative;
    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid transparent;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    padding: 0px 4px;
    text-decoration: none;
    text-align: center;
    height: 32px;
    color: rgb(50, 49, 48);
    background-color: transparent;
    margin: 0px 2px;
    user-select: none;

    &.top-btn-hover:hover{
        color: rgb(50, 49, 48);
        background-color: rgb(210, 208, 206);
    }

    &.top-btn-disabled{
        color: rgb(161, 159, 157);
        background: transparent;
        cursor: default;
        pointer-events: none;
    }

    .top-btn-content{
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
    }
}

.top-btn-icon{
    font-size: 16px;
    height: 16px;
    line-height: 16px;
    margin: 0 4px;
}

.top-part-center{
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;

    .top-center-content{
        font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
        -webkit-font-smoothing: antialiased;
        font-size: 14px;
        font-weight: 400;
        box-shadow: none;
        margin: 0px;
        padding: 0px;
        box-sizing: border-box;
        position: relative;
        color: rgb(0, 120, 212);
        white-space: nowrap;
        display: flex;
        align-items: center;
    }
}

.top-center-btn{
    outline: transparent;
    position: relative;
    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    font-weight: normal;
    border: 0px;
    border-radius: 0px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    padding: 0px 8px;
    text-decoration: none;
    text-align: center;
    height: 34px;
    color: rgb(0, 0, 0);
    background-color: transparent;
    line-height: 34px;
    margin-right: 8px;
    user-select: none;

    &.is-select::before{
        background-color: rgb(0, 120, 212);
        bottom: 0px;
        content: "";
        height: 2px;
        left: 8px;
        position: absolute;
        right: 8px;
        transition: left 0.267s cubic-bezier(0.1, 0.25, 0.75, 0.9), right 0.267s cubic-bezier(0.1, 0.25, 0.75, 0.9);
    }

    &:hover{
        &.is-select::before{
            left: 2px;
            right: 2px;
        }
    }
}

.top-right-btn{
    outline: transparent;
    position: relative;
    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    font-weight: 400;
    border: none;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    padding: 0px 16px;
    text-decoration: none;
    text-align: center;
    min-width: 80px;
    height: 32px;
    background-color: rgb(43, 136, 216);
    color: white;
    margin: 0px 4px;
    user-select: none;

    &.cancel-btn{
        background-color: var(--bg-color);
        color: #242424;
        border: 1px solid #d1d1d1;

        &:hover{
            background-color: #f5f5f5;
            border-color: #c7c7c7;
        }
    }
}

.top-btn-center {
    justify-content: center;
}

.img-part {
    // flex: 1;
    height: calc(100% - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.return-btn {
    padding: 30px 30px 0 30px;

    .iconfont{
        color: var(--iconfont-normal);
        cursor:not-allowed;
    }

    .iconfont-active{
        color: var(--primary-color);
        cursor: pointer;
    }
}

.tool-list {
    display: flex;
    justify-content: space-around;
}

.tool-item .tool-item-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--iconfont-normal);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tool-item .tool-item-icon .iconfont {
    display: inline-block;
}

.tool-item .tool-item-text {
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
}

.footer-btn {
    display: flex;
    justify-content: space-between;
    padding: 10px 30px 0 30px;
}

.img-container{
    position: absolute;
}

.canvas-container{
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

.image{
    position: absolute;
    left: 0;
    top: 0;
}

